import React from 'react';
import {Navigate, Route, Routes} from "react-router-dom";
import Issues from "../pages/Issues";
import Books from "../pages/Books";
import Interviews from "../pages/Interviews";
import AddIssue from "../pages/AddIssue";
import IssueDetail from "../pages/IssueDetail";
import SearchPage from "../pages/SearchPage";
import Personal from "../pages/Personal";

function RouterConfig(props) {
    return (
        <Routes>
            <Route path="/issues" element={<Issues/>}></Route>
            <Route path="/issues/:id" element={<IssueDetail/>}></Route>
            <Route path="/addIssue" element={<AddIssue/>}></Route>
            <Route path="/books" element={<Books/>}></Route>
            <Route path="/interviews" element={<Interviews/>}></Route>
            <Route path="/searchPage" element={<SearchPage/>}></Route>
            <Route path="/personal" element={<Personal/>}></Route>
            <Route path="/" element={<Navigate replace to="/issues"/>}></Route>
        </Routes>
    );
}

export default RouterConfig;